{% extends "home.html" %}
{% block right_content %}
    <ol class="breadcrumb">
        <li><a href="{{ buildUrl('/home') }}">数据可视化系统</a></li>
        <li><a href="{{ url_for('account_page.index') }}">账户管理</a></li>
        <li class="active">账户信息</li>
    </ol>
<div class="row m-t">
	<div class="col-lg-12">
        <div class="row">
            <div class="col-lg-12">
                <div class="m-b-md">
					<a class="btn btn-outline btn-primary pull-right" href="{{ buildUrl('/account/set') }}?id={{ info.id }}">
                        <i class="fa fa-pencil"></i>编辑
                    </a>
					<h2>账户信息</h2>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-2" style="margin-left: 20px;">
                <img {% if info.avatar %} src="{{ buildStaticUrl(info.avatar) }}" {% else %}
                                                      src="{{ buildStaticUrl('/images/photo/f2f38bbfd59a75381852748962f83943.jpeg') }}" {% endif %}
                                                      alt="" width="100px" height="100px;">
            </div>
            <div class="col-lg-8">
                <p class="m-t">姓名：{{ info.nickname }}</p>
                <p>手机：{{ info.mobile }}</p>
                <p>邮箱：{{ info.email }}</p>
            </div>
        </div>
        <div class="row m-t">
            <div class="col-lg-12">
                <div class="panel blank-panel">
                    <div class="panel-heading">
                        <div class="panel-options">
                            <ul class="nav nav-tabs">
                                <li class="active">
                                    <a href="javascript:void(0);" data-toggle="tab" aria-expanded="false">访问记录</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="panel-body">
                        <div class="tab-content">
                            <div class="tab-pane active">
                                <table class="table table-bordered">
                                    <thead>
                                        <tr>
                                            <th>访问时间</th>
                                            <th>访问Url</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    {% if error_log %}
                                        {% for item in error_log %}
                                            <tr>
                                                <td>{{ item.created_time }}</td>
                                                <td>{{ item.target_url }}</td>
                                            </tr>
                                        {% endfor %}
                                        <tr><td colspan="2">只显示最近5条访问记录</td></tr>
                                    {% else %}
                                    <tr><td colspan="2">暂无数据</td></tr>
                                    {% endif %}
                                     </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
	</div>
</div>
{% endblock %}
